<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Dashboard Template for Bootstrap</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<div th:replace="~{/commons/common::headBar}"></div>

<div class="container-fluid">
    <div class="row">
        <div th:replace="~{/commons/common::sideBar(active='paper.html')}"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <form th:action="@{/exam/update}" method=post name="examForm">
                <input type="hidden" name="id" th:value="${exam.getId()}">
                <div class="form-group">
                    <label>考试名称</label>
                    <input type="text" required="required" name="title" class="form-control" th:value="${exam.getTitle()}">
                </div>
                <div class="form-group">
                    <label>备注</label>
                    <input type="text" name="content" class="form-control" th:value=" ${exam.getContent()}">
                </div>
                <div class="form-group">
                    <label>指定班级</label>
                    <select class="form-control" name="className">
                        <option value="">请选择</option>
                        <option
                                th:each="class:${classList}"
                                th:text="${class.getName()}"
                                th:value="${class.getName()}">
                        </option>
                    </select>
                </div>
                <div class="form-group">
                    <label>开始时间</label>
                    <input autocomplete="off" type="text" id="date1" name="startTime" class="form-control" th:value="${#dates.format(exam.getStartTime(),'yyyy-MM-dd HH:mm:ss')}">
                </div>
                <div class="form-group">
                    <label>结束时间</label>
                    <input autocomplete="off" type="text" id="date2" name="endTime" class="form-control" th:value="${#dates.format(exam.getStartTime(),'yyyy-MM-dd HH:mm:ss')}">
                </div>
                <div class="form-group">
                    <label>考试时长(分钟)</label>
                    <input type="text" name="totalTime" class="form-control" th:value="${exam.getTotalTime()}">
                </div>
                <button type="submit" class="btn btn-success" name="method" value="1">确认</button>
                <button type="submit" class="btn btn-info" name="method" value="2">编辑题目</button>
                <a th:href="@{/exam/list2}"><button class="btn btn-danger" type="button">取消</button></a>
            </form>
        </main>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" th:src="@{/laydate/laydate.js}"></script>
<script>
    // feather.replace()
    //执行一个laydate实例
    laydate.render({
        elem: '#date1', //指定元素
        type: 'datetime'
    });

    laydate.render({
        elem: '#date2', //指定元素
        type: 'datetime'
    });
</script>

</body>

</html>